﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.ClearScript;
using Microsoft.ClearScript.V8;

namespace BEELab
{
    public partial class Test : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            var engine = new V8ScriptEngine();
            //var engine = new Microsoft.ClearScript.Windows.JScriptEngine();

            engine.AddHostType("HTTP", typeof(BEELab.Data.HTTPHelper));
            Response.Write(engine.Evaluate("HTTP.Post('http://httpbin.org/post', 'a=1&b=2');"));
        }
    }
}